<template>
    <div class="flex-row">
        <sub-yqjrgfqjk></sub-yqjrgfqjk>
        <sub-map></sub-map>
        <sub-air-quality></sub-air-quality>
        <wiv-dialog :visible.sync="bVisible"
                    width="1030px"
                    height="780px"
                    title="轨迹查询"
                    style="z-index: 2">
            <sub-dialog :visible.sync="bVisible"></sub-dialog>
        </wiv-dialog>
    </div>
</template>

<script>
    import SubMap from './home/map.vue'//地图
    import SubYqjrgfqjk from './home/yqjrgfqjk.vue'//园区今日固废运输监控
    import SubAirQuality from './home/airquality.vue'//空气质量
    import SubDialog from './home/dialog.vue'//空气质量

    export default {
        components: {
            SubMap,
            SubYqjrgfqjk,
            SubAirQuality,
            SubDialog
        },
        data() {
            return {
                bVisible: false,//弹框显示
            }
        },
        //**** watch
        //**** 生命周期钩子：mounted, updated, beforeDestroy 等
        mounted() {
            this.$EventBus.$emit('fViewReceive', 'init')
            this.$EventBus.$on('fMapReceive', this.fNotify)
        },
        beforeDestroy() {
        },
        //**** methods
        methods: {
            //*** 开放给父子组件的接口方法
            //*** 事件响应函数
            //*** 其他
            //页面接受事件
            fNotify(sType, data) {
                switch (sType) {
                    case 'showLayer'://弹窗
                        this.bVisible = true;
                        break;
                }
                console.log('接到地图通知', sType, data);
            },
        }
        //**** template, render
    }
</script>

<style lang="less" rel="stylesheet" scoped>
</style>

